package com.hbase.zbf.config;

import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

/**
 * @author: LCG
 * @date: 2022-04-29 14:05:18
 * @description: hbase 配置
 **/
@Configuration
public class HbaseConfig {

   @Bean
   public Connection getHbaseConnection() throws IOException {

       Connection connection = ConnectionFactory.createConnection(HBaseConfiguration.create());

       return connection;
   }

}
